function Person() {
    var _name;
    function setName(name) {
        _name = name;
    }
    function getName() {
        return _name;
    }
    return {
        setName: setName,
        getName: getName
    };
}

var p = Person();
p.setName("zhangsan");
console.log(p.getName())
